package top.toptimus.dto.material;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import top.toptimus.util.ValueUtil;

import java.sql.ResultSet;
import java.sql.SQLException;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class FabricInventorySalesDTO {
    private String code;
    private Double quantity;
    private Double unit_price;

    public FabricInventorySalesDTO(ResultSet resultSet) throws SQLException {
        this.code = resultSet.getString("code");
        this.quantity = ValueUtil.DoubleNullValue(resultSet.getString("quantity"));
        this.unit_price = ValueUtil.DoubleNullValue(resultSet.getString("unit_price"));
    }
}
